<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Demo19</title>
  <script src="js/vue.js"></script>
</head>
<body>
<div id="app"></div>
</body>
<script>
  const app=Vue.createApp({
    data(){
      return{
        count:0
      }
    },
    methods:{
      addclickcount(num,event ){
        //target 事件源
        console.log(event.target);
        console.log(num);
        this.count+=num;
      },
      addclicktwo(){
        console.log("记录一下")
      }
    },
    template:`
      <div>目前已点佳丽数量{{count}}.</div>
<!-- 还需要事件，这里要用$event -->
      <button @click="addclickcount(2,$event),addclicktwo()">增加一位佳丽</button>
        `
  })
  const vm=app.mount("#app")

</script>

</html>
